package wt.hpad.model.remote;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import wt.hpad.model.bean.ResponseMessage;

/**
 * Http 请求服务
 * Created by wt on 17-10-10.
 */

public interface HttpService {
    @Headers({
            "Accept-Encoding: application/json"
            , "User-Agent: *****"
    })

    /*
     *
     * 获取所有菜(菜单)
     */
    @GET("pad/dish/query")
    Call<ResponseMessage> getAllDishes();


    /**
     * 获取所有桌台
     */
    @GET("pad/table/queryAll")
    Call<ResponseMessage> getAllTableInfo();

    /**
     * 登录
     *
     * @param deviceID 设备编号
     */
    @GET("pad/login")
    Call<ResponseMessage> login(@Query("id") String deviceID);

    /**
     * 点菜
     */
    @FormUrlEncoded
    @POST("pad/order/dish/add")
    Call<ResponseMessage> placeOrder(@Field("tableID") String tableID,
                                     @Field("waiter") String waiter,
                                     @Field("peopleNum") String peopleNum,
                                     @Field("content") String content);

    /**
     * 退菜
     */
    @FormUrlEncoded
    @POST("pad/order/dish/retreat")
    Call<ResponseMessage> dishRetreat(@Field("sid") int sid,
                                      @Field("dishNum") int dishNum,
                                      @Field("tipOfException") String tipOfException);

    /**
     * 获取某个桌台所有菜
     */
    @GET("pad/table/query")
    Call<ResponseMessage> getTableDishes(@Query("tableID") String tableID);

    /**
     * 获取菜品分类
     */
    @GET("pad/dish/type/query")
    Call<ResponseMessage> getDishType();

}
